/**
 *
 */
package uy.edu.um.taller2;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

/**
 * @author pegardan
 *
 */
public class ClientTest {

	public static void main(String[] args) {

		try {

			String sObjectService = "HelloWorldService";

			Registry oRegitry = LocateRegistry.getRegistry(1099);

			HelloWorldRemote oHelloWorld = (HelloWorldRemote) oRegitry.lookup(sObjectService);

			String sReturn = oHelloWorld.sayHelloWorld("Daniel");

			System.out.println("Salida: "+sReturn);

		} catch (Exception e) {
			System.out.println("El error recibido es:");
			e.printStackTrace();
		}

	}

}
